export default class Utils {

    public static canvas: HTMLCanvasElement = document.querySelector('canvas');


    public static getCusor() {
        return Utils.canvas.style.cursor;
    }

    public static setCusor(type: string) {
        return Utils.canvas.style.cursor = type;
    }

    public static addCusorPointerEvents(node: cc.Node) {
        node.on(cc.Node.EventType.MOUSE_ENTER, () => {
            Utils.setCusor("pointer");
        });

        node.on(cc.Node.EventType.MOUSE_LEAVE, () => {
            Utils.setCusor("default");
        });
    }

}